/*
 * WxBizAppConfigMapper.java
 * Copyright(C) WYY
 * All rights reserved.
 * -----------------------------------------------
 * 2019-10-11 Created
 */
package com.project.web.wechat.mapper.app;

import com.project.web.course.mapper.common.BaseMapper;
import com.project.web.wechat.model.app.WxBizAppConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WxBizAppConfigMapper extends BaseMapper<WxBizAppConfig, Long> {

    /**
     * 根据微信企业配置ID删除应用¬
     *
     * @param wxBizConfigId 微信企业配置ID
     * @return
     */
    Integer delByConfigId(Long wxBizConfigId);

    /**
     * 根据企业微信id及应用ID查询企业微信应用
     *
     * @param wxBizConfigId 企业微信ID
     * @param agentId       应用ID
     * @return
     */
    WxBizAppConfig getByAgentId(@Param("wxBizConfigId") Long wxBizConfigId, @Param("agentId") String agentId);

    /**
     * 根据企业微信id查询企业微信应用
     *
     * @param wxBizConfigId 企业微信ID
     * @return
     */
    List<WxBizAppConfig> getByConfigId(Long wxBizConfigId);
}